﻿@using SrBBSPro.Entities
@model SrBBSPro.Entities.Project
@{
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
    ViewBag.Title = "项目日程";
}
<div class="main layui-clear">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>@Model.Name 项目日程</legend>
    </fieldset>
    <div class="wrap">
        <div class="fly-tab user-tab">
            <span id="tabs">
                <a href="javascript:;" class="tab-this">所有日程</a>
                <a href="javascript:;">我的日程</a>
            </span>
        </div>
        <fieldset class="layui-elem-field">
            <legend>移行准备工作</legend>
            <div class="layui-field-box">

            </div>
        </fieldset>
        <fieldset class="layui-elem-field">
            <legend>移行机能</legend>
            <div class="layui-field-box">
                <table id="schedule" lay-filter="schedule"></table>
            </div>
        </fieldset>
    </div>
</div>
<fieldset class="layui-elem-field">
    <legend>项目人员选择</legend>
    <div class="layui-field-box">
        <form method="post"></form>
    </div>
</fieldset>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>    
</script>
@section scripts{
    <script>
        layui.use(['jquery', 'form', 'table'], function () {
            var table = layui.table;
            var $ = layui.jquery;
            var sid = '@Model.Id';
            var cols = [[
                { type: 'numbers' }
                , { field: 'Kind', title: '区分', width: 150 }
                , { field: 'Info', title: '内容', width: 150 }
                , { field: 'Scale', title: '规模', width: 80 }
                , { field: 'Tasks', title: '作业', width: 150 }
                , { field: 'Person', title: '担当', width: 80 }
                , { field: 'TaskPeriod', title: '作业期间', width: 110, templet: '<span>d.TaskStart - d.TaskEnd</span>' }
                , { field: 'Rate', title: '进度', width: 60 }
            ]];
            if (true) {
                cols[0].push({ title: '操作', width: 100, fixed: 'right', toolbar: '#barDemo' });
            }
            table.render({
                elem: '#schedule'
                , height: 550
                , page: {}
                , limits: [10]
                , url: '/Project/ScheduleList?sid=' + sid
                , autoSort: false
                , toolbar: '#toolbarDemo'
                , defaultToolbar: ['filter', 'exports', 'print']
                , cols: cols
            });

        });
    </script>
}